package com.service.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.service.dao.query.RWRecordParam;
import com.service.dao.po.RWRecordResultPO;
import com.service.dao.model.RwRecord;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

public interface RwRecordMapper extends BaseMapper<RwRecord> {

    List<RWRecordResultPO> pageRecord4Admin(@Param("record") RWRecordParam recordParam);

    List<RwRecord> pageRecord4App(@Param("memberId") Integer memberId, @Param("coinsId") Integer coinsId, @Param("optType") Integer optType);

    BigDecimal getMemberTotalRwNumByTimeAndCoins(
            @Param("memberId") Integer memberId, @Param("optType") Integer optType,
            @Param("coinsId") Integer coinsId, @Param("startTime") Date startTime,
            @Param("endTime") Date endTime);


    List<RwRecord> getRecordByTxId(@Param("txid") String txid);

    Integer fundedAllbyAddr(@Param("address") String address,@Param("coinType") Integer coinType);

    Integer fundedById(@Param("id") Integer id);
}